import $http from '@/utils/http'
let { get, post, put } = $http;
const commonUrl = '/store/info'
// 首页
// 获取首页典型案例
let getHomeCase = () => {
  return get(`${commonUrl}/index/control/hotCaseList.do`)
}
// 获取首页新闻
const getIndexNews = () => {
  return get(`${commonUrl}/config/tool/control/listIndexNews.do`)
}

// 智能能源
let getGoodsList = (params) => {
  return get(`${commonUrl}/indexGW/control/listAllGoods.do`, params)
}
let getGoodsInfo = (params) => {
  return get(`${commonUrl}/index/control/getGoodsInfo.do`, params)
}

// 典型案例列表
const getCaseLists = params => {
  return get(`${commonUrl}/index/control/caseList.do`, params)
}

// 典型案例详情
const getCaseDetail = params => {
  return get(`${commonUrl}/index/control/getCaseInfo.do`, params)
}

// 新闻列表
const getNewsLists = params => {
  return get(`${commonUrl}/config/tool/control/listNews.do`, params)
}

// 新闻详情
const getNewsDetail = params => {
  return get(`${commonUrl}/config/tool/control/getNewsDetail.do`, params)
}
export default {
  getHomeCase,
  getIndexNews,
  getGoodsList,
  getGoodsInfo,
  getCaseLists,
  getCaseDetail,
  getNewsLists,
  getNewsDetail
}



